<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"    
      xmlns:f="http://java.sun.com/jsf/core">
    <h:head>
        <title>Sistema Integrado de Transportes</title>
        <meta name="viewport" content="width=device-width,initial-scale=1.0"></meta>
        <!-- keys gotten from recaptcha -->
        <!-- <meta HTTP-EQUIV="refresh" 
              CONTENT="0;URL=${pageContext.request.contextPath}/SITransportes-war/ventas/"/>-->
        
    </h:head>
      
 
    
    <h:body>  
         <h:form id="jojo" >
        
      <p:idleMonitor timeout="#{session.maxInactiveInterval*700}"  >
         <p:ajax event="idle" 
 oncomplete="idleDialog.show()" />
     </p:idleMonitor>
        
            
 
     <p:dialog id="confirmDialog" 
               modal="true"  closable="false"
		header=" ---SESSIÓN DE USUARIO TERMINADO LOGIN--- "  widgetVar="idleDialog">
 
         <p:commandButton id="Logout" value="OK"  
                          onclick="window.location.href = '${request.contextPath}/index.jsf?faces-redirect=true';"/>
                
      </p:dialog>
        
        
    </h:form> 
        <h:form id="frmSesion" >
            
            <p:growl id="growl" showDetail="true" />
  <h:panelGrid columns="1" style="padding: 100px 250px 100px 450px;">                
                <center>
                    <p:panel header="Ingreso al Sistema"  style="width: 450px;" >                        
                        <h:panelGrid columns="2" cellpadding="5">                            
                            <h:outputLabel for="username" value="Usuario" />
                            <p:inputText style="width: 95%" value="#{managedBeanSessionando.objetoUsuario.usuLogin}" 
                                         id="username" required="true" label="username" requiredMessage="Ingrese su Login"/>

                            <h:outputLabel for="password" value="Password" />
                            <h:inputSecret style="width: 95%" value="#{managedBeanSessionando.objetoUsuario.usuPassword}" 
                                           id="password" required="true" label="password" requiredMessage="Ingrese su Password"/>

                           
                            <f:facet name="footer">
                                
                                    <h:commandLink   action="#{managedBeanSessionando.loegando(managedBeanIniciosesion)}">
                                    <p:graphicImage value="/images/loginsistema.png" height="45" width="90"/>
                                    </h:commandLink> 
                                
                                    
                               
                            </f:facet>
                        </h:panelGrid>
                       
                        <h:panelGroup id="panelventana" rendered="#{managedBeanSessionando.stado}">
    <script type="text/javascript">
        window.open('${request.contextPath}/ventas/index.jsf?faces-redirect=true', '', 'height=' + screen.height + ',width=' + screen.width + ',resizable=no,scrollbars=1');
    </script>
</h:panelGroup>
               
                    </p:panel>  
                </center>
            </h:panelGrid>
             
        </h:form>
    </h:body>
</html>